The standard Note event ( Figure 5 ) supports most music requirements. The Note event allows up to 32 part numbers 0 to 31 and support pitches from 2 octaves below middle C to 3 octaves above. The Extended Note event ( Figure 6 ) provides a wider range of pitch values, microtonal values to define any pitch, and extended note duration. The Extended Note event requires two long words; the standard Note event requires only one.
Table 2Contents of a Note event
0-127, 0 = no audible response (but used to indicate a NOTE OFF) |
|
specifies how long to play the note in units defined by the media time scale or tune player time scale |
The part number bit field contains the unique part identifier initially used during the TuneSetHeader call.
The pitch bit field allows a range from 0-63, which is mapped to the values 32-95 representing the traditional equal tempered scale. For example, the value 28 (mapped to 60) is middle C.
The velocity bit field allows a range from 0-127. A velocity value of 0 produces silence.
The duration bit field defines the number of units of time during which the part will play the note. The units of time are defined by the media time scale or tune player time scale.
Macro call used to stuff the Note event's long word:
qtma_StuffNoteEvent(x, instrument, pitch, volume, duration)
Macro calls used to extract fields from the Note event's long word:
qtma_Instrument(x)
qtma_NotePitch(x)
qtma_NoteVelocity(x)
qtma_NoteVolume(x)
qtma_NoteDuration(x)
Table 3Contents of an Extended Note event
The part number bit field contains the unique part identifier initially used during the TuneSetHeader call.
If the pitch bit field is less than 128, it is interpreted as an integer pitch where 60 is middle C. If the pitch is 128 or greater, it is treated as a fixed pitch.
Microtonal pitch values are produced when the 15 bits of the pitch field are split. The upper 7 bits defines the standard equal tempered note and the lower 8 bits defines 256 microtonal divisions between the standard notes.
Macro call used to stuff the extended Note event's long words:
qtma_StuffXNoteEvent(w1, w2, instrument, pitch, volume, duration)
Macro calls used to extract fields from the extended Note event's long words:
qtma_XInstrument(m, l)
qtma_XNotePitch(m, l)
qtma_XNoteVelocity(m, 1)
qtma_XNoteVolume(m, l)
qtma_XNoteDuration(m, l)